// 封装所有和用户相关的接口函数
import request from '@/utils/request'
import { LoginData, UserRoleData } from './type'
// 登录
export function loginAPI(data: LoginData) {
  return request({
    url: '/remote/pubc/token/getLoginToken',
    method: 'POST',
    data,
  })
}
// 用户信息
export function userInfoAPI() {
  return request({
    url: '/remote/pubc/token/getUserInfo',
    method: 'POST',
    data: {},
  })
}
// 用户角色
export function roleDetail(data: UserRoleData) {
  return request({
    url: '/remote/pubc/token/getRoleInfo',
    method: 'post',
    data,
  })
}
// 用户退出
export function logoutAPI() {
  return request({
    url: '/remote/pubc/token/loginOut',
    method: 'post',
    data: {},
  })
}

// 验证码
export function getSlideInfo() {
  return request({
    url: '/remote/pubc/verification/getSliderCode',
    method: 'POST',
    data: {},
  })
}

//修改密码
export function changePassword(data: any) {
  return request({
    url: '/remote/pubc/token/changePassword',
    method: 'post',
    data: {},
  })
}
